package com.bynk.bynk_demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bynk.bynk_demo.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user")
    public List<User> findAllUser();

    @Select("select * from user where ID=#{id}")
    public User findUserById(Integer id);

    @Insert("insert into user ( name, sex, pd) values (#{ name},#{sex},#{pd})")
    public int addUser(User user);

}
